package cn.wangxl.group.rpc.protocol;

import cn.wangxl.group.rpc.rpcEntity.RpcRequest;
import cn.wangxl.group.rpc.rpcEntity.RpcResponse;

/**
 * 消息协议，消息编解码
 * @Deacription MessageProtocol
 * @Author 20112128
 * @Date 2020/9/18 10:14
 **/
public interface MessageProtocol {

    byte[] marshallingRequest(RpcRequest rpcRequest);

    RpcRequest unmarshallingRequest(byte[] data);

    byte[] marshallingResponse(RpcResponse rpcResponse);

    RpcResponse unmarshallingResponse(byte[] data);
}
